﻿namespace Home
{
    using System;
    using System.Collections.Generic;
    using System.Diagnostics;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    [Serializable]
    public class BidAccount
    {
        private readonly string name;
        private readonly string idCardNumber;
        private readonly string bidNumber;
        private readonly string bidPassword;

        // for serialization only
        protected BidAccount()
        {
        }

        public BidAccount(string name, string idCardNumber, string bidNumber, string bidPassword)
        {
            Debug.Assert(!string.IsNullOrEmpty(name));
            Debug.Assert(!string.IsNullOrEmpty(idCardNumber) && idCardNumber.Length == 18);
            Debug.Assert(!string.IsNullOrEmpty(bidNumber));
            Debug.Assert(!string.IsNullOrEmpty(bidPassword));

            this.name = name;
            this.idCardNumber = idCardNumber;
            this.bidNumber = bidNumber;
            this.bidPassword = bidPassword;
        }

        public string Name
        {
            get { return this.name; }
        }

        public string IdentificationCardNumber
        {
            get { return this.idCardNumber; }
        }

        public string BidNumber
        {
            get { return this.bidNumber; }
        }

        public string BidPassword
        {
            get { return this.bidPassword; }
        }
    }
}
